package atguigu.boot.bean;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @program: springboot-01-helloworld
 * @ClassName Cert
 * @description:
 * @author: zwq
 **/
@Component
//@ConfigurationProperties作用：用于属性绑定，从配置文件中找cert开头的
@ConfigurationProperties(prefix = "cert")
public class Cert {
    //除了使用注解来进行属性绑定，还可以用@Value注解；示例：@Value("${cert.userId}")
    private String userId;
    private String userName;
    private String cardType;
    private String cardNum;
    private String phone;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public String getCardNum() {
        return cardNum;
    }

    public void setCardNum(String cardNum) {
        this.cardNum = cardNum;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public String toString() {
        return "Cert{" +
                "userId='" + userId + '\'' +
                ", userName='" + userName + '\'' +
                ", cardType='" + cardType + '\'' +
                ", cardNum='" + cardNum + '\'' +
                ", phone='" + phone + '\'' +
                '}';
    }
}
